<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="utf-8" />

<title>首页 | 深大人的微型博客</title>
<style type="text/css" id="header">
<!--
-->
</style>
<link href="css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js.js" charset="utf-8"></script>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jcarousellite_1.0.1.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<style>
.clsImg{
	position:absolute;
	border:solid 3px #ccc;
	width:250px;
	height:250px;
	display:none;
	z-index: 1;
	}
</style>

<script type="text/javascript">

	$(function(){
	
	/*登陆按钮改变样式*/
	$("#login_button").mouseover(function(){
		$("#login_button").attr("src","button/login_button.png");
		});
	$("#login_button").mouseout(function(){
		$("#login_button").attr("src","button/login_button1.png");
		});
	/****************/
	
	/*登陆按钮改变样式*/
	$("#regist_button").mouseover(function(){
		$("#regist_button").attr("src","button/regist.png");
		});
	$("#regist_button").mouseout(function(){
		$("#regist_button").attr("src","button/regist1.png");
		});
	/****************/
	
	/*注册框收起图标改变样式*/
	$("#register_area #up_button").mouseover(function(){
		$("#register_area #up_button img").attr("src","button/up_button1.png");
		});
	$("#register_area #up_button").mouseout(function(){
		$("#register_area #up_button img").attr("src","button/up_button.png");
		});
	/****************/
	
	/*登陆框收起图标改变样式*/
	$("#login_area #up_button").mouseover(function(){
		$("#login_area #up_button img").attr("src","button/up_button1.png");
		});
	$("#up_button").mouseout(function(){
		$("#login_area #up_button img").attr("src","button/up_button.png");
		});
	/****************/
	
	/*弹出登陆框*/
	$("#nav_login").click(function() {
		$("#register_area").slideUp(300);
		$("#login_area").slideToggle(500);
		});
	/*****************/
	/*收起登陆框*/
	$("#login_area #up_button").click(function() {
		$("#login_area").slideUp(500);
		});
	/*****************/
	
	/*弹出注册框*/
	$("#nav_register").click(function() {
		$("#login_area").slideUp(300);
		$("#register_area").slideToggle(500);
		});
	/*****************/
	/*收起注册框*/
	$("#register_area #up_button").click(function() {
		$("#register_area").slideUp(500);
		});
	/*****************/

	/*
	*登陆区
	*/
	/*邮箱输入框*/
	$("#email_login").bind({
		/*聚焦*/
		focus: function(){
			$("#email_login_label").text("");
		},
		/*失去焦点*/
		blur: function(){
			if(email = $("#email_login").val() == ""){
				$("#email_login_label").text("邮箱地址");
			}
		},
		/*双击*/
		dblclick: function(){
			$("#email_login").val("");
		}	
	});
	/*密码输入框*/
	$("#password_login").bind({
		/*聚焦*/
		focus: function(){
			$("#password_login_label").text("");
		},
		/*失去焦点*/
		blur: function(){
			var email = $("#password_login").val();
			if(email == ""){
				$("#password_login_label").text("密码");
			}
		},
		/*双击*/
		dblclick: function(){
			$("#password_login").val("");
		}	
	});
	 /*忘记密码*/
	$("#check_box a").click(function(){
		alert("密码是用MD5算法加密的，您若忘记密码，我亦木有办法...");
	});
	
	/*****************/
	
	/*
	*注册区
	*/
	/*邮箱输入框*/
	$("#email_register").bind({
		/*聚焦*/
		focus: function(){
			$("#email_register_label").text("");
		},
		/*失去焦点*/
		blur: function(){
			var email = $("#email_register").val();
			if(email == ""){
				$("#email_register_label").text("邮箱地址");
			}
		},
		/*双击*/
		dblclick: function(){
			$("#email_register").val("");
		}	
	});
	/*密码输入框*/
	$("#password_register").bind({
		/*聚焦*/
		focus: function(){
			$("#password_register_label").text("");
		},
		/*失去焦点*/
		blur: function(){
			var email = $("#password_register").val();
			if(email == ""){
				$("#password_register_label").text("密码");
			}
		},
		/*双击*/
		dblclick: function(){
			$("#password_register").val("");
		}	
	});
	/*注册验证*/
	$("#register_form").validate({
		rules: {
			email_reg: {required: true, email: true },
			password_reg: {required: true, minlength: 6, maxlength: 16 }
		},
		errorPlacement: function(error, element) {
			if (element.attr("name") == "email_reg"){
			       error.appendTo("#email_reg_error");
			}
			else {
			       error.appendTo("#password_reg_error");
			}
		}
//		debug:true
	});
	/*登陆表验证*/
	$("#login_form").validate({
		rules: {
			email: {required: true, email: true },
			password: {required: true, minlength: 6, maxlength: 16 }
		},
		errorPlacement: function(error, element) {
			if (element.attr("name") == "email"){
			       error.appendTo("#email_login_error");
			}
			else {
			       error.appendTo("#password_login_error");
			}
		}
//		debug:true
	});
	/*****************/
	
	/*最新博客旋转木马*/
	$("#people").jCarouselLite({
        btnNext: "#right_button",
        btnPrev: "#left_button"
    });
	/*****************/
	/*旋转木马向左按钮*/
	$("#left_button").bind({
		mouseover: function(){
			$("#left_button img").attr("src","button/left_button1");
		},
		mouseout: function(){
			$("#left_button img").attr("src","button/left_button.png");
		}
	});
	/********************/
	/*旋转木马向右按钮*/
	$("#right_button").bind({
		mouseover: function(){
			$("#right_button img").attr("src","button/right_button1");
		},
		mouseout: function(){
			$("#right_button img").attr("src","button/right_button.png");
		}
	});
	/********************/
	
	});
</script>
</head>
<body>
<?php 
include_once 'msg_redirect.php';
if($_COOKIE["TTU"] == "logined"){
my_header("home.php");
}?>
<!--头部开始-->
<div id="header">
<div id="nav_content">
    	<div id="logo"><img src="image/siteLogo.png" /></div>
      	<form>
        	<div id="nav_search">
            	<input id="search_content" name="search" type="text" value="搜索感兴趣的..." size="12" />
            	<input id="search_button" type="image" src="button/search_button.png" /> 
          </div>
        </form>
    <div id="nav_login"><a href="javascript:void(0)">登陆</a></div>
    <div id="nav_register"><a href="javascript:void(0)">注册</a></div>
<div id="nav_about"><a href="">关于blogSZU</a></div>
    	</div>
</div>
<!--头部结束-->

<!--主体开始-->
<div id="container">

<!-- ---------------登陆区开始 ------------------>
<div id="login_area">
	<div id="login_greeting">登陆深大微博</div>
    <div id="up_button"><a href="javascript:void(0)"><img src="button/up_button.png" /></a></div>
	<div id="login_table">
      	<form action="login.php" method="post" name="login_form" id="login_form">
		  <table width="547" height="67" cellpadding="0" cellspacing="0">
                <tr>
       	 		  	<td height="30"><label id="email_login_label" class="login_register_label"for="email">邮箱地址</label>
               	    	<input id="email_login" name="email" class="form_input" type="text"/></td>
	  	  	  	  <td><label id="password_login_label" class="login_register_label"for="password">密码</label>
          <input id="password_login" name="password" class="form_input" type="password"  /></td>
    				<td><input id="login_button"type="image" src="button/login_button1.png" /></td>
    			</tr>
    			<tr>
    				<td id="email_login_error"></td>
    				<td id="password_login_error"></td>
    			</tr>
  				<tr>
   				  <td height="20" >&nbsp;</td>
                    <td id="check_box"><input id="remember"name="remember" type="checkbox" value="remember" checked />
   		  		  <label for="remember">一个星期内自动为我登陆</label></td>
                  <td id="check_box"><a href="javascript:void(0)">忘记密码？</a></td>
            </tr>
		  </table>
          <input name="login" type="hidden" value="yes" />
	  </form>
    </div>
  </div>
<!-- ---------------登陆区结束始 ------------------>

<!-- --------------- 注册区开始 ------------------>
<div id="register_area">
		<div id="register_greeting">欢迎使用深大微博</div>
    	<div id="up_button"><a href="javascript:void(0)"><img src="button/up_button.png" /></a></div>
		<div id="register_table">
      	<form action="regist.php" method="post" name="register_form" id="register_form">
        <table width="547" height="43" cellpadding="0" cellspacing="0">
                <tr>
       	 		  	<td height="30"><label id="email_register_label" class="login_register_label" for="email_reg">邮箱地址</label>
    	      <input id="email_register" name="email_reg" class="form_input" type="text"/></td>
	  	  	  	  	<td><label id="password_register_label" class="login_register_label" for="password_reg">密码</label>
       	  	  	  	  <input id="password_register" name="password_reg" class="form_input" type="password"/></td>
    				<td><input id="regist_button"type="image" src="button/regist1.png" /></td>
    			</tr>			
    			<tr>
    				<td id="email_reg_error"></td>
    				<td id="password_reg_error"></td>
    			</tr>
  		</table>
        <input name="regist" type="hidden" value="yes"/>
        </form>
      </div>
</div>
<!-------------------- 注册窗口结束---------------------->

<div id="big_photo"><img src="image/indexImg.jpg" width="850" height="531"/></div>
<div id="show_people">
	<div class="saying">People who are using the blogszu...</div>
       		<div id="left_button"><a href="javascript:void(0)"><img src="button/left_button.png" /></a></div>
            <div id="people">
           	  <ul>
           	  <?php 
           	  		include_once 'sql_connect.php';
           	  		$my_query = mysql_query("select user_info.u_no,u_name,u_dept from user_info,user_detail where user_info.u_no=user_detail.u_no",$connection);
           	  		$my_result = mysql_fetch_array($my_query);
           	  		if($my_result){
           	  			do {
           	  			?>
          				<li class="photo"><img src=<?php 
          					$show_head_sql = mysql_query("select h_data from head where u_no='$my_result[u_no]'",$connection);
    						$show_head_result = mysql_fetch_array($show_head_sql);
    						$my_data = $show_head_result[h_data];
    						if (!$my_data){
    							echo "'head_image/09.jpg' width='118' height='118'";
    						}
    						else  echo "'".$my_data."' width='118' height='118'";
          				?>/>
       	      				<div id="user_name"><?php echo $my_result[u_name];?></div><div id="user_dept"><?php echo $my_result[u_dept];?></div></li>
                    	<?php
           	  			} 
           	  			while ($my_result = mysql_fetch_array($my_query));
           	  		}
                ?>
                </ul>
   			</div> 
            <div id="right_button"><a href="javascript:void(0)"><img src="button/right_button.png" /></a></div>
  </div>
</div>
    <!--主体结束-->
    
<!--尾部说明开始 -->
<div id="footer_wrap">
  	<div id="footer">深圳大学计算机与软件学院@毕业设计项目网站<br />指导老师：王华明<br />项目负责：陈作鑫<br />
    小组成员：陈作鑫&nbsp;&nbsp;陈志杰&nbsp;&nbsp;赖晓东</div>
</div>
<!--尾部说明结束 -->
</body>
</html>